package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.PrUserBankCardDTO;
import com.financing.wap.dao.IPrUserBankCardDao;
import com.financing.wap.common.SqlName;
/**
 * pr_user_bank_card  
 * 账户银行卡 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("prUserBankCardDao")
public class PrUserBankCardDaoImpl extends BaseDaoImpl<PrUserBankCardDTO, Integer> implements IPrUserBankCardDao {


	@Override
	public int insert(PrUserBankCardDTO prUserBankCard) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.PrUserBankCardSql.insert, prUserBankCard);
	}

	@Override
	public void update(PrUserBankCardDTO prUserBankCard) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.PrUserBankCardSql.update, prUserBankCard);
	}

	@Override
	public void updateForce(PrUserBankCardDTO prUserBankCard) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.PrUserBankCardSql.updateForce, prUserBankCard);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.PrUserBankCardSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<PrUserBankCardDTO> queryList(PrUserBankCardDTO prUserBankCard) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.PrUserBankCardSql.queryList, prUserBankCard);
	}

	@Override
	public int queryListCount(PrUserBankCardDTO prUserBankCard) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.PrUserBankCardSql.queryListCount, prUserBankCard);
	}

	@Override
	public PrUserBankCardDTO loadById(Integer id) throws SQLException {
		return  (PrUserBankCardDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.PrUserBankCardSql.loadById,id);
	}

	@Override
	public Class<PrUserBankCardDTO> getEntityClass() {
		return PrUserBankCardDTO.class;
	}
 	
}
